/*
 * base_gui.h.cpp
 *
 *  Created on: 19.08.2012
 *      Author: caffeine
 */




#include "base_gui.h"
#include <lampe/StringUtils.h>

void readBaseGUITags(irr::gui::IGUIElement*e,lampe::xml::IXmlNode*node){
	irr::core::vector2di pos=irr::core::vector2di(node->getAttS32("x",0),node->getAttS32("y",0));
	irr::core::rect<irr::s32> size=irr::core::rect<irr::s32>(pos.X,pos.Y,pos.X+node->getAttS32("width",50),pos.Y+node->getAttS32("height",50));
	e->setRelativePosition(size);
    e->setID(lampe::str::makeID(node->getAttString("id")));

/*
	e->setMaxSize(irr::core::dimension2du(node->getAttS32("maxwidth",0),node->getAttS32("maxheight",0)));
	e->setMinSize(irr::core::dimension2du(node->getAttS32("minwidth",0),node->getAttS32("minheight",0)));
	e->setText(irr::StringUtils::UTF8_to_WChar(node->getAttString("text","").c_str()).c_str());
	e->setVisible(node->getAttBool("visible",true));
	e->setToolTipText(irr::StringUtils::UTF8_to_WChar(node->getAttString("tooltiptext","").c_str()).c_str());
	e->setTabOrder(node->getAttS32("taborder",0));
	e->setNotClipped(node->getAttBool("notclipped",false));
	e->setEnabled(node->getAttBool("enabled",true));
*/
}
